<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\fcs\vpos\service\guide;

class PerformanceTask {
	
	static $_TSPEC;
	public $orderAmount = null;
	public $orderQty = null;
	public $orderCustomerQty = null;
	public $uv = null;
	public $newSvipQty = null;
	public $taskCnt = null;
	public $planCnt = null;
	public $deliveredCnt = null;
	public $successCnt = null;
	public $exeTaskCnt = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'orderAmount'
			),
			2 => array(
			'var' => 'orderQty'
			),
			3 => array(
			'var' => 'orderCustomerQty'
			),
			4 => array(
			'var' => 'uv'
			),
			5 => array(
			'var' => 'newSvipQty'
			),
			1001 => array(
			'var' => 'taskCnt'
			),
			1002 => array(
			'var' => 'planCnt'
			),
			1003 => array(
			'var' => 'deliveredCnt'
			),
			1004 => array(
			'var' => 'successCnt'
			),
			1005 => array(
			'var' => 'exeTaskCnt'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['orderAmount'])){
				
				$this->orderAmount = $vals['orderAmount'];
			}
			
			
			if (isset($vals['orderQty'])){
				
				$this->orderQty = $vals['orderQty'];
			}
			
			
			if (isset($vals['orderCustomerQty'])){
				
				$this->orderCustomerQty = $vals['orderCustomerQty'];
			}
			
			
			if (isset($vals['uv'])){
				
				$this->uv = $vals['uv'];
			}
			
			
			if (isset($vals['newSvipQty'])){
				
				$this->newSvipQty = $vals['newSvipQty'];
			}
			
			
			if (isset($vals['taskCnt'])){
				
				$this->taskCnt = $vals['taskCnt'];
			}
			
			
			if (isset($vals['planCnt'])){
				
				$this->planCnt = $vals['planCnt'];
			}
			
			
			if (isset($vals['deliveredCnt'])){
				
				$this->deliveredCnt = $vals['deliveredCnt'];
			}
			
			
			if (isset($vals['successCnt'])){
				
				$this->successCnt = $vals['successCnt'];
			}
			
			
			if (isset($vals['exeTaskCnt'])){
				
				$this->exeTaskCnt = $vals['exeTaskCnt'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'PerformanceTask';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("orderAmount" == $schemeField){
				
				$needSkip = false;
				$input->readDouble($this->orderAmount);
				
			}
			
			
			
			
			if ("orderQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->orderQty); 
				
			}
			
			
			
			
			if ("orderCustomerQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->orderCustomerQty); 
				
			}
			
			
			
			
			if ("uv" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->uv); 
				
			}
			
			
			
			
			if ("newSvipQty" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->newSvipQty); 
				
			}
			
			
			
			
			if ("taskCnt" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->taskCnt); 
				
			}
			
			
			
			
			if ("planCnt" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->planCnt); 
				
			}
			
			
			
			
			if ("deliveredCnt" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->deliveredCnt); 
				
			}
			
			
			
			
			if ("successCnt" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->successCnt); 
				
			}
			
			
			
			
			if ("exeTaskCnt" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->exeTaskCnt); 
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		$xfer += $output->writeFieldBegin('orderAmount');
		$xfer += $output->writeDouble($this->orderAmount);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('orderQty');
		$xfer += $output->writeI32($this->orderQty);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('orderCustomerQty');
		$xfer += $output->writeI32($this->orderCustomerQty);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('uv');
		$xfer += $output->writeI32($this->uv);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('newSvipQty');
		$xfer += $output->writeI32($this->newSvipQty);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('taskCnt');
		$xfer += $output->writeI32($this->taskCnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('planCnt');
		$xfer += $output->writeI32($this->planCnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('deliveredCnt');
		$xfer += $output->writeI32($this->deliveredCnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('successCnt');
		$xfer += $output->writeI32($this->successCnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('exeTaskCnt');
		$xfer += $output->writeI32($this->exeTaskCnt);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>